@echo off
if not exist "%USERPROFILE%\.m2" mkdir "%USERPROFILE%\.m2"
echo ^<?xml version="1.0" encoding="UTF-8"?^> > "%USERPROFILE%\.m2\settings.xml"
echo ^<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" >> "%USERPROFILE%\.m2\settings.xml"
echo          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> "%USERPROFILE%\.m2\settings.xml"
echo          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"^> >> "%USERPROFILE%\.m2\settings.xml"
echo   ^<mirrors^> >> "%USERPROFILE%\.m2\settings.xml"
echo     ^<mirror^> >> "%USERPROFILE%\.m2\settings.xml"
echo       ^<id^>aliyunmaven^</id^> >> "%USERPROFILE%\.m2\settings.xml"
echo       ^<mirrorOf^>central^</mirrorOf^> >> "%USERPROFILE%\.m2\settings.xml"
echo       ^<name^>阿里云公共仓库^</name^> >> "%USERPROFILE%\.m2\settings.xml"
echo       ^<url^>https://maven.aliyun.com/repository/public^</url^> >> "%USERPROFILE%\.m2\settings.xml"
echo     ^</mirror^> >> "%USERPROFILE%\.m2\settings.xml"
echo   ^</mirrors^> >> "%USERPROFILE%\.m2\settings.xml"
echo ^</settings^> >> "%USERPROFILE%\.m2\settings.xml"
echo Maven配置文件已创建: %USERPROFILE%\.m2\settings.xml 